const app = getApp()

Page({
  data: {
    view: "APP",
    array: [
      {
        message: 'foo',
      },
      {
        message: 'bar'
      }
     ],
    result: null
  },
  copy() {
    wx.setClipboardData({
      data: this.data.result,
      success (res) {
        wx.vibrateShort()
      }
    })
  },
  onLoad(options) {
    this.setData({
      result: app.globalData.scanCodeResult
    })
    console.log(app.globalData)


    // console.log("logs onLoad")
    // console.log(getCurrentPages())
  },
  onShow() {
    console.log("logs onShow")
  },
  onReady() {
    console.log("logs onReady")
  },
  onHide() {
    console.log("logs onHide")
  },
  onPullDownRefresh() {
    console.log("logs onPullDownRefresh")
  },
  onReachBottom() {
    console.log("logs 加载下一页")
  },
  onShareAppMessage() {
    console.log("logs onShareAppMessage")
    return {
      title: "自定义的分享标题",
      imageUrl: "https://www.baidu.com/img/pc_9c5c85e6b953f1d172e1ed6821618b91.png"
    }
  },
  onPageScroll(event) {
    console.log(event)
  }
})
